home *** CD-ROM | disk | FTP | other *** search
/ HaCKeRz Kr0nlcKLeZ 1 / HaCKeRz Kr0nlcKLeZ.iso / chibacity / gbbdisk.arj / KBWIN95 / CREATE.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-06-06  |  1.4 KB  |  50 lines

  1. ;CREATE creates the file used by CAPTURE.COM for code coming from the KBWIN95
  2. ;virus under Windows 95.
  3.  
  4. ;(C) 1995 American Eagle Publications, Inc., All Rights Reserved.
  5.  
  6. ;Buffer size and location definitions for use with KBWIN95 and CAPTURE.
  7. BUF_LOC         EQU     600H            ;This works with Windows-95 Final Beta
  8. BUF_SIZE        EQU     64              ;Size of buffer in words
  9.  
  10. .model small
  11. .code
  12.  
  13.         ORG     100H
  14.  
  15. START:
  16.         call    OPEN_FILE               ;create command line file
  17.         jc      EXIT                    ;exit on error
  18.         call    CLOSE_FILE              ;else close it
  19.  
  20.         xor     ax,ax
  21.         mov     es,ax
  22.         mov     di,BUF_LOC
  23.         mov     cx,BUF_SIZE+3
  24.         rep     stosw
  25.  
  26. EXIT:
  27.         mov     ax,4C00H                ;exit to DOS
  28.         int     21H
  29.  
  30. ;This routine creates the file named on the command line and returns with
  31. ;c set if failure, nc if successful, and bx=handle.
  32. OPEN_FILE:
  33.         mov     ah,3CH                  ;create file r/w
  34.         mov     cx,0
  35.         mov     dx,OFFSET CAPFILE
  36.         int     21H
  37.         mov     bx,ax                   ;handle to bx
  38.         ret                             ;retur with c set if failure, else nc
  39.  
  40. CAPFILE DB      'CAPTURE.CAP',0
  41.  
  42. ;This function closes the file whose handle is in bx.
  43. CLOSE_FILE:
  44.         mov     ah,3EH
  45.         int     21H
  46.         ret
  47.  
  48.         END     START
  49.  
  50.